package easyway.core.utils;

import java.io.File;

public class CreateDir {
	public static boolean createDir(String destDirName) {
		   File dir = new File(destDirName);
		   if(dir.exists()) {
		    System.out.println("创建目录" + destDirName + "失败，目标目录已存在！");
		    return false;
		   }
		   if(!destDirName.endsWith(File.separator))
		    destDirName = destDirName + File.separator;
		   // 创建单个目录
		   if(dir.mkdirs()) {
		    System.out.println("创建目录" + destDirName + "成功！");
		    return true;
		   } else {
		    System.out.println("创建目录" + destDirName + "成功！");
		    return false;
		   }
	}
	public static void main(String[] args) {
		CreateDir test=new CreateDir();
		test.createDir("d:/mnt/easyway/uploadTest");
	}
}
